{template 'common/header'}
<link id="barindexCss" rel="stylesheet" href="../addons/meepo_bbs/template/mobile/default/style/base.css" />
<link id="barindexCss" rel="stylesheet" href="../addons/meepo_bbs/template/mobile/default/style/style.css" />
<script type="text/javascript" src="../addons/meepo_bbs/template/mobile/default/style/script.js"></script>
<title>奖品列表</title>
<section class="stay">
        <section class="order_content">
            <section class="order_item">
		<aside>我的积分：{$user['credit1']}</aside>
		<!--aside>我的会员积分：{$member['credit1']}</aside-->
					{if $my_goods_list}
					<section class="button">
					<a href="{php echo $this->createMobileUrl('home_credit_goods_myrequest')}">查看已兑换奖品</a>
					</section>
					{/if}
			</section>
        </section>

        {if count($goods_list)<=0 }
        <section class="stay_content">
        <section class="stay_box">
        本时间段没有可兑换商品
        </section>
        </section>
        {/if}

    	<!--content-->
        <section class="stay_content">
			{loop $goods_list $item}
        	<!--box-->
            <section class="stay_box">
			<aside class="stay_title">{$item['title']}</aside>
                <article class="stay_main">
                    <p class="stay_banner"><img src="{php echo $_W['attachurl'].$item['logo']}" /></p>
			        <!--item-->
                    <section class="stay_item">
                        <section class="stay_item_l fl">
                            <section class="stay_lump">
                                <span class="stay_lump_l">剩余数量：</span>
                                <p class="stay_lump_r"><span> {$item['amount']}</span></p>
                            </section>
                        </section>
                        <section class="stay_item_r fl">
                            <section class="stay_lump">
                                <span class="stay_lump_l">价值：</span>
                                <p class="stay_lump_r"><span>{$item['price']}元</span></p>
                            </section>
                        </section>
                        <section class="stay_item_r fl">
                            <section class="stay_lump">
                                <span class="stay_lump_l">消耗积分：</span>
                                <p class="stay_lump_r"><span>{$item['cost']}分</span></p>
                            </section>
                        </section>
                    </section>
		    <section class="stay_item">		   
                        <section class="fl">
                            <section class="stay_lump">
                                <span class="stay_lump_l">截止日期：</span>
                                <p class="stay_lump_r"><span>{$item['deadline']}</span></p>
                            </section>
                        </section>
 		    </section>
                    <!--item end-->
	                <!--item-->
                    <section class="stay_content">
						{php echo htmlspecialchars_decode($item['content'])}
					</section>
                    <!--item end-->
			
					<!--btn-->
					<section class="button">
					{if ($item['cost_type'] == 1 and $user['credit1'] < $item['cost']) }
						<a class="gray" href="#" onclick="alert('积分不足')">兑换</a>
					{else}
						<a href="{php echo $this->createMobileUrl('home_credit_request', array('id' => $item['id']))}">兑换</a>
					{/if}
					</section>
                    <!--btn end-->
                </article>
            </section>
            <!--box end-->
			{/loop}
        </section>
        <!--content end-->
    </section>
{template 'common/footer'}